var app = getApp();
Page({
    data:{
        curPage : "/zofui_sales/lottery/count",
		siteroot : app.siteInfo.siteroot.replace('app/index.php', ''),uniacid: app.siteInfo.uniacid,
    },
    onLoad:function(options){
        var self = this;
        var gid = options.id ? options.id : '';
        
        app.com.http('lottery','POST',{gid:gid,op:'countrule'},0,false,'','',function(res){
            if (!res.data.errno) {
                self.setData({
                    Pagetheme : res.data.data.params.style,
                    total : res.data.data.total,
                    lastten : res.data.data.lastten,
                    joined : res.data.data.joined,
                    dis : res.data.data.dis,
                    award : res.data.data.award,
                    inited : true,
                });
                // 关闭下拉刷新
                wx.stopPullDownRefresh();
            }else{
                app.com.alert(res.data.message);
            }
        });
        wx.setNavigationBarTitle({
          title:  '',
        });
       
    },
    location : function( e ){
        app.com.location( e );
    },
    otherapp : function( e ){
        app.com.otherapp( e );
    },
    navigateto : function( e ){
        app.com.navigateto( e );
    },
    redirectto : function( e ){
        app.com.redirectto( e );
    },    
    callphone : function(e){
        app.com.callphone( e );
    },
    toweburl : function(e){
        app.com.toweburl( e );
    },
    showimages : function( e ){
        app.com.showimages( e );
    },
    footNavigate(e){
        var url = e.currentTarget.dataset.url;
        wx.switchTab({
          url: url
        })
    },

})